package com.crossbone;

import com.crossbone.admin.CheckBoxMultipleChoicePage;
import de.agilecoders.wicket.core.Bootstrap;
import de.agilecoders.wicket.core.settings.BootstrapSettings;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.spring.injection.annot.SpringComponentInjector;

/**
 * Application object for your web application. If you want to run this
 * application without deploying, run the Start class.
 *
 * @see com.crossbone.Start#main(String[])
 */
public class WicketApplication extends WebApplication {

    /**
     * @see org.apache.wicket.Application#getHomePage()
     */
    @Override
    public Class<? extends WebPage> getHomePage() {
        return HomePage.class;
    }

    /**
     * @see org.apache.wicket.Application#init()
     */
    @Override
    public void init() {
        super.init();
       // mountPage("/", CheckBoxMultipleChoicePage.class);
        mountPackage("test",CheckBoxMultipleChoicePage.class);
        // add your configuration here
        onInitialize();
        BootstrapSettings settings = new BootstrapSettings();
        Bootstrap.install(this, settings);

    }

    protected void onInitialize() {
        getComponentInstantiationListeners().add(new SpringComponentInjector(this));
    }
}
